﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="EmpAdminPanel.aspx.cs" Inherits="EmpAdminPanel" Title="Administración de Cuenta" %>
<%@ Register Src="imgUpload.ascx" TagName="img_upload" TagPrefix="iu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="Server">
    <div style="max-width: 450px; margin: auto auto; padding-left: 10px; padding-right: 10px;">
        <span class="membrete">CUIL/T</span>
        <asp:Label ID="lbl_cuit" CssClass="membretedato" runat="server" ></asp:Label><a id="printQR" icon="print" href="#" onclick="javascript:openPopUpQR();" style="margin-left:20px;">Imprimir QR</a>
        <span class="membrete">Contraseña</span>
        <asp:TextBox ID="txt_pass" runat="server" MaxLength="20" Width="300"></asp:TextBox>
        <span class="membrete">E-Mail</span>
        <asp:TextBox ID="txt_mail" runat="server" MaxLength="50" Width="300"></asp:TextBox>
        <span class="membrete">Razón Social</span>
        <asp:TextBox ID="txt_razon" runat="server" MaxLength="50" Width="300"></asp:TextBox>
        <span class="membrete">Rubro</span>
        <asp:DropDownList ID="ddl_Rubro" runat="server" AppendDataBoundItems="true">
            <asp:ListItem Selected="True" Value="Seleccione" Text="Seleccione"></asp:ListItem>
        </asp:DropDownList>
        <span class="membrete">Logo <span class="tooltip" alt="Esta imagen será visible para los usuarios como la identificadora de la empresa">?</span></span>
        <asp:Image ID="img_logo" ImageUrl="~/static/NoPicture.gif" runat="server" Width="70" Height="70" /> <!-- "Vos gritás -¡No Logo! / o no gritás -¡No Logo! / O gritás -¡No Logo... no!" ;) -->
        <span class="membrete">Latitud/Longitud</span>
        <asp:TextBox ID="txt_latitud" runat="server" MaxLength="50" CssClass="il_blk" Width="150"></asp:TextBox>
        <asp:TextBox ID="txt_longitud" runat="server" MaxLength="50" CssClass="il_blk" Width="150"></asp:TextBox>
        <img id="img_location" runat="server" border="0" src="#" formatlocation="http://maps.googleapis.com/maps/api/staticmap?center={0}&zoom=13&size=600x300&maptype=roadmap&markers=color:red%7C{0}&sensor=false" alt="" />
        <div style="margin-left: 20px;">
            <ul id="ul_mensajes" runat="server" class="ul_mensajes"></ul>
            <asp:Button ID="btn_guardar" runat="server" Text="Guardar" OnClick="btn_guardar_Click" />
        </div>
        
        <div id="d_upload" class="" style="display:none;" title="Pregunta">
            <iu:img_upload id="iu_ctrl" runat="server" />    
        </div>
        <script type="text/javascript" language="javascript">
    
            $().ready(bind_upload);
            aspbh_endHandler.push(bind_upload);
                       
            function openPopUpQR(){
                window.open("QR_Print.aspx?idemp=" + $('#<%= lbl_cuit.ClientID %>').html().replace("-","").replace("-",""),'','width=500,height=500');
            }
            
            function bind_upload(){ 
                
                $( "#d_upload" ).dialog({
                    title: 'Seleccione el archivo a subir',
                    modal: false,
                    width: 600,
                    autoOpen:false
                });
                
                $("#d_upload","form").remove();
  
  
                $("#<%= img_logo.ClientID %>")
                    .click(function(){
                        $( "#d_upload" )
                            .dialog('open')
                            .parents(".ui-dialog")
                            .detach()
                            .appendTo("form")
                            .show();
                    }); 
            }
                        
        </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="footer" runat="Server">
</asp:Content>
